# Contributor: Grigory Kirillov <txgk@bk.ru>
# Maintainer:
pkgname=libarb
pkgver=2.23.0
pkgrel=2
pkgdesc="Library for rigorous real and complex arithmetic with arbitrary precision"
url="https://arblib.org"
# s390x: blocked by flint
arch="all !s390x"
license="LGPL-2.1-or-later"
makedepends="gmp-dev flint-dev mpfr-dev"
subpackages="$pkgname-static $pkgname-dev"
source="https://github.com/fredrik-johansson/arb/archive/$pkgver/arb-$pkgver.tar.gz"
builddir="$srcdir/arb-$pkgver"

build() {
	export CFLAGS="${CFLAGS/-Os/-O3}" # gotta go fast

	# Not an autoconf configure!
	./configure \
		--prefix=/usr \
		CC="$CC" \
		CXX="$CXX" \
		CFLAGS="$CFLAGS"
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
cd15c1adc1c8a6b7cd7b98f5d32afec3b04f6849998cd8586924a6ebb5fe1a1a6efc250fa7fc1d346b2331daa02a4d07133ee58edeae3cc6684d306c8b78c4ae  arb-2.23.0.tar.gz
"
